package main

import (
	"fmt"
	"strings"
)

func format_template(pkg string, transmap []*JunkDrawer) []byte {
	const fs = "\t\"%s\": _Ðβご_shift_item_{\"%s\", %d},\n"
	var trans []string
	for _, jd := range transmap {
		trans = append(trans, fmt.Sprintf(fs, jd.sig.name, jd.fname, jd.line))
	}
	//template is a string generated from template.go by template2include.sh
	tmpl := fmt.Sprintf(template, pkg, pkg, strings.Join(trans, ""))
	return []byte(tmpl)
}
